import base from './base.js';
import https from './https.js';
const ajax = {
  transcribeAudio: ({ filePath, name = 'file', formData = {} }) => {
    return https._uploadFile({
      url: base.transcribeAudio,
      filePath: filePath,
      name: name,
      formData: formData
    });
  },
  userIdentity: ({ }) => {
    return https._get({
      url: base.userIdentity
    })
  },
  qb: ({
    data
  }) => {
    return https._get({
      url: base.qb,
      data: data
    })
  },
  api1: ({
    data
  }) => {
    return https._get({
      url: base.api1,
      data: data
    })
  },
  api2: ({
    data
  }) => {
    return https._get({
      url: base.api2 + '/' + data.pk
    })
  },
  api3: ({
    data: data
  }) => {
    return https._post({
      url: base.api3,
      data: data
    })
  },
  api4: ({
    data
  }) => {
    return https._get({
      url: base.api4 + '/' + data.id
    })
  },
  api44: ({
    data
  }) => {
    return https._get({
      url: base.api4 + '/' + data.pk
    })
  },
  api5: ({
    data
  }) => {
    return https._get({
      url: base.api5,
      data: data
    })
  },
  api6: ({
    data
  }) => {
    return https._get({
      url: base.api6 + '/' + data.pk
    })
  },
  api7: ({
    data
  }) => {
    return https._post({
      url: base.api7,
      data: data
    })
  },
  api8: ({
    data
  }) => {
    return https._get({
      url: base.api8 + '/' + data.pk,
      data: data
    })
  },
  api88: ({
    data
  }) => {
    return https._get({
      url: base.api8 + '/' + data.pk,
      data: data
    })
  },
  api9: ({
    data
  }) => {
    return https._get({
      url: base.api9 + '/' + data.pk
    })
  },
  api10: ({
    data
  }) => {
    return https._post({
      url: base.api10,
      data: data
    })
  },
  api11: () => {
    return https._get({
      url: base.api11
    })
  },
  api111: ({
    data
  }) => {
    return https._getToken({
      url: base.api11 + '/' + data.pk
    })
  },
  api12: ({
    data
  }) => {
    return https._post({
      url: base.api12,
      data: data
    })
  },
  api122: ({
    data
  }) => {
    return https._get({
      url: base.api12 + '/' + data.pk
    })
  },
  api13: () => {
    return https._get({
      url: base.api13
    })
  },
  api14: ({
    data
  }) => {
    return https._post({
      url: base.api14,
      data: data
    })
  },
  api144: ({
    data
  }) => {
    return https._get({
      url: base.api14 + '/' + data.pk
    })
  },
  api15: () => {
    return https._get({
      url: base.api15
    })
  },
  api16: ({
    data
  }) => {
    return https._get({
      url: base.api16 + '/' + data.pk
    })
  },
  api17: ({
    data
  }) => {
    return https._post({
      url: base.api17,
      data
    })
  },
  api18: ({
    data
  }) => {
    return https._get({
      url: base.api18,
      data: data
    })
  },
  api19: ({
    data
  }) => {
    return https._get({
      url: base.api19,
      data: data
    })
  },
  wechatPay: (data) => {
    return https._post({
      url: base.wechatPay,
      data: data,
      header: {
        'Content-Type': 'application/x-www-form-urlencoded'
      }
    });
  },
  api20: ({ }) => {
    return https._getToken({
      url: base.api20
    })
  },
  api21: ({
    data
  }) => {
    return https._post({
      url: base.api21,
      data: data
    })
  },
  api22: () => {
    return https._get({
      url: base.api22
    })
  },
  api23: () => {
    return https._get({
      url: base.api23
    })
  },
  api24: () => {
    return https._get({
      url: base.api24
    })
  },
  api25: () => {
    return https._get({
      url: base.api25
    })
  },
  api26: ({
    data
  }) => {
    return https._post({
      url: base.api26,
      data: data
    })
  },
  api27: ({
    data
  }) => {
    return https._post({
      url: base.api27,
      data: data
    })
  },
  api28: () => {
    return https._get({
      url: base.api28
    })
  },
  api29: () => {
    return https._get({
      url: base.api29
    })
  },
  api30: () => {
    return https._get({
      url: base.api30
    })
  },
  api31: () => {
    return https._get({
      url: base.api31
    })
  },
  api32: () => {
    return https._get({
      url: base.api32
    })
  },
  api33: () => {
    return https._get({
      url: base.api33
    })
  },
  fpqy: ({
    data,
    id
  }) => {
    return https._get({
      url: base.fpqy + '/' + id,
      data: data
    })
  },
  fpqy2: ({
    data,
    id
  }) => {
    return https._post({
      url: base.fpqy + '/' + id,
      data: data
    })
  },
  zkqy: ({
    data,
    id
  }) => {
    return https._get({
      url: base.api8 + '/' + id,
      data: data
    })
  },
  zkqy2: ({
    data,
    id
  }) => {
    return https._post({
      url: base.zkscqy + '/' + id,
      data: data
    })
  },
  fanpqy: ({
    data
  }) => {
    return https._get({
      url: base.api11 + '/' + data.id
    })
  },
  fpyy: ({
    data
  }) => {
    return https._get({
      url: base.fpyy + '/' + data.id
    })
  },
  jdyy: ({
    data
  }) => {
    return https._get({
      url: base.jdyy + '/' + data.id
    })
  },
  zkyy: ({
    data
  }) => {
    return https._get({
      url: base.zkyy + '/' + data.id
    })
  },
  fpxq: ({
    data
  }) => {
    return https._get({
      url: base.fpxq + '/' + data.id
    })
  },
  fpxqAdmin: ({
    data
  }) => {
    return https._get({
      url: base.fpxqAdmin + '/' + data.id
    })
  },
  zkxq: ({
    data
  }) => {
    return https._get({
      url: base.zkxq + '/' + data.id
    })
  },
  zkxqAdmin: ({
    data
  }) => {
    return https._get({
      url: base.zkxqAdmin + '/' + data.id
    })
  },
  fptj: ({
    data,
    id
  }) => {
    return https._post({
      url: base.fptj + '/' + id,
      data: data
    })
  },
  fpyytj: ({
    data
  }) => {
    return https._post({
      url: base.api9,
      data: data
    })
  },
  fanphouse: ({
    data,
    id
  }) => {
    return https._post({
      url: base.fanphouse + '/' + id,
      data: data
    })
  },
  zkhouse: ({
    data,
    id
  }) => {
    return https._post({
      url: base.zkscqy + '/' + id,
      data: data
    })
  },
  xqtj: ({
    data
  }) => {
    return https._post({
      url: base.xqtj,
      data: data
    })
  },
  zztj: ({
    data
  }) => {
    return https._post({
      url: base.api14,
      data: data
    })
  },
  hfxq: ({
    data
  }) => {
    return https._get({
      url: base.hfxq + '/' + data.id
    })
  },
  zzxq: ({
    data
  }) => {
    return https._get({
      url: base.zzxq + '/' + data.id
    })
  },
  fanpxq: ({
    data
  }) => {
    return https._get({
      url: base.fanpxq + '/' + data.id
    })
  },
  fanpgd: ({
    data
  }) => {
    return https._post({
      url: base.fanpgd,
      data: data
    })
  },
  fpgd: ({
    data
  }) => {
    return https._post({
      url: base.fpgd,
      data: data
    })
  },
  zkgd: ({
    data
  }) => {
    return https._post({
      url: base.zkgd,
      data: data
    })
  },
  zzgd: ({
    data
  }) => {
    return https._post({
      url: base.api15,
      data: data
    })
  },
  hfgd: ({
    data
  }) => {
    return https._post({
      url: base.api13,
      data: data
    })
  },
  hfgdzt: ({
    data,
    id
  }) => {
    return https._post({
      url: base.api13 + '/' + id,
      data: data
    })
  },
  fanpgdzt: ({
    data,
    id
  }) => {
    return https._post({
      url: base.api10 + '/' + id,
      data: data
    })
  },
  zzgdzt: ({
    data,
    id
  }) => {
    return https._post({
      url: base.api15 + '/' + id,
      data: data
    })
  },
  fqhf: ({
    data
  }) => {
    return https._post({
      url: base.api13,
      data: data
    })
  },
  jdgd: ({
    data
  }) => {
    return https._post({
      url: base.jdgd,
      data: data
    })
  },
  zkzt: ({
    data
  }) => {
    return https._post({
      url: base.zkzt + '/' + data.id,
      data: data
    })
  },
  fyyh: ({ data }) => {
    return https._get({
      url: base.fyyh,
      data: data
    })
  },
  loginInfo: ({
    data
  }) => {
    return https._post({
      url: base.api30 + '/info:wechat',
      data: data
    })
  },
  loginPhone: ({
    data
  }) => {
    return https._post({
      url: base.api30 + '/phone:wechat',
      data: data
    })
  },
  getInfo: () => {
    return https._get({
      url: base.userInfo
    })
  },
  cjfp: ({
    data
  }) => {
    return https._post({
      url: base.api11,
      data: data
    })
  },
  collection: ({
    data
  }) => {
    return https._post({
      url: base.collection,
      data: data
    })
  },
  qxcollection: ({
    id
  }) => {
    return https._delete({
      url: base.collection + '/' + id
    })
  },
  news: ({
    data
  }) => {
    return https._post({
      url: base.news,
      data: data
    })
  },
  qxnews: ({
    id
  }) => {
    return https._delete({
      url: base.news + '/' + id
    })
  },
  yjyy: ({
    data
  }) => {
    return https._post({
      url: base.api2,
      data: data
    })
  },
  fpljqy: ({
    data
  }) => {
    return https._post({
      url: base.api4,
      data: data
    })
  },
  api34: ({
    data
  }) => { //收藏
    return https._get({
      url: base.api34,
      data
    })
  },
  api34Del: ({
    data
  }) => { //收藏删除
    return https._delete({
      url: base.api34 + '/' + data.pk
    })
  },
  api35: ({
    data
  }) => { //提醒
    return https._get({
      url: base.api35,
      data
    })
  },
  api35Del: ({
    data
  }) => { //删除提醒
    return https._delete({
      url: base.api35 + '/' + data.pk
    })
  },
  zkljqy: ({
    data
  }) => {
    return https._post({
      url: base.api8,
      data: data
    })
  },
  market: ({
    data,
    id
  }) => {
    return https._post({
      url: base.market + '/' + id,
      data: data
    })
  },
  finance: ({
    data,
    id
  }) => {
    return https._post({
      url: base.finance + '/' + id,
      data: data
    })
  },
  market2: ({
    data,
    id
  }) => {
    return https._post({
      url: base.zksc + '/' + id,
      data: data
    })
  },
  finance2: ({
    data,
    id
  }) => {
    return https._post({
      url: base.zkcw + '/' + id,
      data: data
    })
  },
  market3: ({
    data,
    id
  }) => {
    return https._post({
      url: base.fpsc + '/' + id,
      data: data
    })
  },
  api52: ({
    data
  }) => { //激活角色
    return https._post({
      url: base.api52 + '/' + data.role_pk + "/active"
    })
  },
  fpgdzt: ({
    data,
    id
  }) => {
    return https._post({
      url: base.api3 + '/' + id,
      data: data
    })
  },
  fpgdxq: ({
    id
  }) => {
    return https._get({
      url: base.api3 + '/' + id,
    })
  },
  zkgdxq: ({
    id
  }) => {
    return https._get({
      url: base.zkgd + '/' + id,
    })
  },
  fanpgdxq: ({
    id
  }) => {
    return https._get({
      url: base.api10 + '/' + id,
    })
  },
  jdgdxq: ({
    id
  }) => {
    return https._get({
      url: base.api17 + '/' + id,
    })
  },
  hfgdxq: ({
    id
  }) => {
    return https._get({
      url: base.api13 + '/' + id,
    })
  },
  zzgdxq: ({
    id
  }) => {
    return https._get({
      url: base.api15 + '/' + id,
    })
  },
  zkgdzt: ({
    data,
    id
  }) => {
    return https._post({
      url: base.zkgd + '/' + id,
      data: data
    })
  },
  jdgdzt: ({
    data,
    id
  }) => {
    return https._post({
      url: base.jdgd + '/' + id,
      data: data
    })
  },
  zkyj: ({
    data
  }) => {
    return https._post({
      url: base.zkyy,
      data: data
    })
  },
  api54: ({
    data
  }) => {
    return https._post({
      url: base.api54,
      data: data
    })
  },
  yhxx: ({
    data,
    id
  }) => {
    return https._get({
      url: base.fyyh + '/' + id + '/phone',
      data: data
    })
  },
  api43: ({
    data
  }) => { //批量获取所有用户信息
    return https._post({
      url: base.api43,
      data
    })
  },
  api88: ({
    data
  }) => {
    return https._getToken({
      url: base.api8 + '/' + data.pk
    })
  },
  api111: ({
    data
  }) => {
    return https._getToken({
      url: base.api11 + '/' + data.pk
    })
  },
  api44: ({
    data
  }) => {
    return https._get({
      url: base.api4 + '/' + data.pk
    })
  },
  api36: ({
    json,
    data
  }) => { //获取目标用户的邀请对象
    return https._get({
      url: base.api36 + '/' + json.user_pk + "/invites",
      data
    })
  },
  api37: ({ }) => { //获取所有用户列表
    return https._getToken({
      url: base.api37
    })
  },
  api38: ({
    data
  }) => { //批量获取用户电话
    return https._post({
      url: base.api38,
      data: data
    })
  },
  api39: ({
    data
  }) => { //批量获取用户邀请数量
    return https._post({
      url: base.api39,
      data
    })
  },
  api40: ({
    data
  }) => { //批量获取用户邀请路径
    return https._post({
      url: base.api40 + '/' + data.pk
    })
  },
  apiYyallUser: ({
    data
  }) => { //获取当前用户的预约订单
    return https._get({
      url: base.apiYyallUser,
      data
    })
  },
  api41: ({ }) => { //权限列表
    return https._get({
      url: base.api41
    })
  },
  api42: ({
    data
  }) => { //获取所有用户集合、获取目标用户的联系方式
    return https._get({
      url: base.api42,
      data
    })
  },
  api43: ({
    data
  }) => { //批量获取所有用户信息
    return https._post({
      url: base.api43,
      data
    })
  },
  api45: ({
    url,
    data
  }) => { //设置角色
    return https._post({
      // url: base.api42 + '/' + url.pk + "/roles/promote",
      url: base.api42 + "/roles/promote",
      data
    })
  },
  api46: ({
    data
  }) => { //获取组别
    return https._get({
      url: base.api46,
      data
    })
  },
  api47: ({
    data
  }) => { //增加组别
    return https._patch({
      url: base.api46 + '/' + data.pk
    })
  },
  api48: ({
    data
  }) => { //将用户认证
    return https._post({
      url: base.api48 + '/' + data.pk + "/set-verified"
    })
  },
  api49: ({
    group,
    data
  }) => { //创建子组
    return https._post({
      url: base.api49 + "?parent_group_pk=" + group.parent_group_pk,
      data
    })
  },
  api50: ({
    data
  }) => { //改变分组
    return https._put({
      url: base.api50 + '/' + data.group_pk + "/users/" + data.user_pk
    })
  },
  api51: ({
    data
  }) => { //删除分组
    return https._delete({
      url: base.api50 + '/' + data.group_pk
    })
  },
  api52: ({
    data
  }) => { //激活角色
    return https._post({
      url: base.api52 + '/' + data.role_pk + "/active"
    })
  },
  api53: ({
    data
  }) => { //拉取被操作者的权限信息
    return https._get({
      url: base.api48 + '/' + data.user_pk + "/roles"
    })
  },
  api56: ({
    data
  }) => { //电话号码
    return https._get({
      url: base.api42 + '/' + data.user_pk + "/phone"
    })
  },
  api57: ({
    data, id
  }) => { //法拍用户评价
    return https._post({
      url: base.api57 + '/' + id, data
    })
  },
  api58: ({
    data, id
  }) => { //折扣用户评价
    return https._post({
      url: base.api58 + '/' + id, data
    })
  },
  api59: ({
    data, id
  }) => { //放盘用户评价
    return https._post({
      url: base.api59 + '/' + id, data
    })
  },
  apiinvites: ({
    data
  }) => { //电话号码
    return https._post({
      url: base.api36 + '/' + data.user_pk + "/invites"
    })
  },
  apisetting: () => { //获取用户设定
    return https._get({
      url: base.apisetting
    })
  },
  apicitydsec: ({
    data
  }) => { //获取省市区
    return https._get({
      url: base.apicitydsec,
      data: data
    })
  },
  qbyy: ({
    data
  }) => {
    return https._get({
      url: base.qbyy,
      data: data
    })
  },
  zkxg: ({
    data,
    id
  }) => {
    return https._post({
      url: base.api5 + '/' + id,
      data: data
    })
  },
  fqjd: ({
    data
  }) => {
    return https._post({
      url: base.api16,
      data: data
    })
  },
  fpxg: ({
    data,
    id
  }) => {
    return https._post({
      url: base.api5 + '/' + id,
      data: data
    })
  },
  apiqrcode: ({
    data,
    json
  }) => { //生成二维码
    return https._post({
      url: base.apiqrcode + '/' + json.category,
      data,
      // responseType: 'arraybuffer'
    })
  },
  apiqrdata: ({
    parms
  }) => { //用户进来拿去scene值获取传过来的值
    return https._post({
      url: base.apiqrdata + '?key=' + parms.key
    })
  },
  api66: ({
    data,
    json
  }) => { //上传图片
    return https._post({
      url: base.api66 + '?content_type=' + json.content_type,
      data
    })
  },
  api67: ({
    data
  }) => { //拉取刚上传的图片
    return https._get({
      url: base.api67 + '/' + data.object_name
    })
  },
  api68: ({
    data
  }) => { //删除刚上传的图片
    return https._delete({
      url: base.api68 + '/' + data.objectName
    })
  },
  img: ({
    data
  }) => { //删除刚上传的图片
    return https._post({
      url: base.img + '?' + 'relatedObjectId=' + data.relatedObjectId,
    })
  },

  apiqb: ({
    data
  }) => { //首页热门房源
    return https._get({
      url: base.apiqb,
      data: data
    })
  },
  khfanpqy: ({
    data,
    json
  }) => { //客户放盘签约
    return https._post({
      url: base.khfanpqy + '/' + json.pk,
      data
    })
  },
  khfpqy: ({
    data,
    json
  }) => { //客户优选签约
    return https._post({
      url: base.khfpqy + '/' + json.pk,
      data
    })
  },
  khzkqy: ({
    data,
    json
  }) => { //客户折扣签约
    return https._post({
      url: base.khzkqy + '/' + json.pk,
      data
    })
  },
  api60: ({
    data,
    json
  }) => { //优选订单评价
    return https._post({
      url: base.api60 + '/' + json.pk,
      data
    })
  },
  api61: ({
    data,
    json
  }) => { //折扣订单评价
    return https._post({
      url: base.api61 + '/' + json.pk,
      data
    })
  },
  api62: ({
    data,
    json
  }) => { //放盘订单评价
    return https._post({
      url: base.api62 + '/' + json.pk,
      data
    })
  },
  api63: ({
    data,
    json
  }) => { //尽调订单评价
    return https._post({
      url: base.api63 + '/' + json.pk,
      data
    })
  },
  api64: ({
    data,
    json
  }) => { //好房订单评价
    return https._post({
      url: base.api64 + '/' + json.pk,
      data
    })
  },
  api65: ({
    data,
    json
  }) => { //增值订单评价
    return https._post({
      url: base.api65 + '/' + json.pk,
      data
    })
  },
  userHistory: ({
    id
  }) => { //用户浏览记录列表
    return https._get({
      url: base.userHistory + '/' + id + '/access-log'
    })
  },
  historyList: ({
    id
  }) => { //房源浏览记录列表
    return https._get({
      url: base.historyList + '/' + id + '/access-log'
    })
  },
  getHistory: ({
    data
  }) => { //获取用户浏览记录
    return https._post({
      url: base.getHistory,
      data
    })
  },
  gethouses: ({
    data
  }) => { //获取用户浏览记录
    return https._post({
      url: base.gethouses,
      data
    })
  },
  fpsearch: ({
    data
  }) => { //优选搜索
    return https._get({
      url: base.fpsearch,
      data
    })
  },
  zksearch: ({
    data
  }) => { //折扣搜索
    return https._get({
      url: base.zksearch,
      data
    })
  },
  sf: ({
    data
  }) => { //折扣搜索
    return https._post({
      url: base.sf,
      data
    })
  },
  zhipai: ({
    id
  }) => { //指派人员组别
    return https._get({
      url: base.api50 + '/' + id,
    })
  },
  groupUser: ({
    data
  }) => {
    return https._post({
      url: base.api50 + '/users',
      data
    })
  },
  fpyyxg: ({
    data, id
  }) => {
    return https._post({
      url: base.fpyyxg + '/' + id,
      data
    })
  },
  zkyyxg: ({
    data, id
  }) => {
    return https._post({
      url: base.zkyyxg + '/' + id,
      data
    })
  },
  fanpyyxg: ({
    data, id
  }) => {
    return https._post({
      url: base.fanpyyxg + '/' + id,
      data
    })
  },
  xljt: ({
    data
  }) => {
    return https._get({
      url: 'https://data.zhai78.com/openOneGood.php',
      data
    })
  },
  removeGroup: ({
    data
  }) => { //将用户移除组别
    return https._delete({
      url: base.api50 + '/' + data.group_pk + "/users/" + data.user_pk
    })
  },
  banner: ({ data }) => {
    return https._get({
      url: base.banner
    })
  },
  userSearch: ({ data }) => {
    return https._post({
      url: base.userSearch + '?query=' + data.query + '&limit=' + data.limit + '&offset=' + data.offset
    })
  },
  dataCenter: ({ data }) => {
    return https._get({
      url: base.dataCenter, data
    })
  },
  weekSummary: ({ data }) => {
    return https._get({
      url: base.weekSummary, data
    })
  },
  weekInfo: ({ data }) => {
    return https._get({
      url: base.weekInfo, data
    })
  },
  today: ({ data, listType }) => {
    return https._get({
      url: base.today + '/' + listType, data
    })
  },
  addzk: ({ data }) => {
    return https._post({
      url: base.addzk, data
    })
  },
  aichat: ({ data, onChunkReceived, onError, onComplete }) => https._post_stream({
    url: base.aichatApi,
    data: data,
    onChunkReceivedCallback: onChunkReceived,
    onError: onError,
    onComplete: onComplete
  }),
  plsxj: ({ data }) => {
    return https._post({
      url: base.plsxj,
      data: data
    })
  },
  plscfy: ({ data }) => {
    return https._delete({
      url: base.plscfy,
      data: data
    })
  },

  zzqyxq: ({ data }) => {
    return https._get({
      url: base.zzqyxq + '/' + data.pk
    })
  },
  zzqypl: ({ id, data }) => {
    return https._post({
      url: base.zzqyxq + '/' + id + ':submit',
      data: data
    })
  },
  phoneCode: ({ data }) => {
    return https._post({
      url: base.phoneCode,
      data: data
    })
  },
  codeVali: ({ data }) => {
    return https._post({
      url: base.codeVali,
      data: data
    })
  },
  modifyInfo: ({ data }) => {
    return https._patch({
      url: base.modifyInfo,
      data: data,
    })
  },
  modelConfig: ({ data }) => {
    return https._get({
      url: base.modelConfig,
      data: data
    })
  },
  wechatTest: ({ data }) => {
    return https._post({
      url: base.wechatTest,
      data: data
    })
  },
  getPriceConfig: ({ data }) => { //获取价格配置
    return https._get({
      url: base.priceConfig + '/' + data.configKey,
    })
  },
  wechatPay: (data) => {
    return https._post({
      url: base.wechatPay,
      data: data,
      header: {
        'Content-Type': 'application/x-www-form-urlencoded'
      }
    });
  },
  queryOrderList: (data) => {
    return https._get({
      url: base.queryOrderList,
      data: data
    });
  },
}
export default ajax;
